<template>
    <div>
        <span> this is serverInfo: {{serverInfo}}</span>
    </div>
</template>
<style>
    body{
        background-color:#fefefe;
    }
</style>
<script>
    export default{
        data(){
            return{
                "serverInfo":''
            }
        },
        created: function() {
            this.getServerInfo();
        },
        methods:{
            "getServerInfo":function(){
                this.$http.get('/json/helloInfo.json').then(function(response){
                    //this.serverInfo=response.data;
                    this.serverInfo=response.data.message;

                }, function(response){
                    this.serverInfo="http error";
                    console.log(response);
                });
            }
        }
    }
</script>
